1. Field of the Invention
This invention relates in general to improvements in the field of computer systems having log-structured storage, and more particularly, to a journal space release mechanism for journal data sets residing in log-structured storage.
2. Description of Related Art
Generally, log-structured storage organizes files by writing data to the end of a sequential byte stream known as a "log". The data contained by a file is typically accessed via pointers to sections of the log. When the file is deleted, the portions of the log which contained the file can be released for subsequent writing of new data. Since log-structured storage uses sequential blocks, the free space should be collected into a contiguous space to be most useful. This process is called cleaning.
Applications sometimes write data using a "two-phase" commit method. The two-phase commit method involves writing the update to a journal and then writing the update to the true target location. Once the data is hardened in the target location, the journal data is no longer needed. Current applications, such as databases or Extended Remote Copy, leave the old data in the journal data set until it becomes full, then starts writing new data at the beginning of the journal data set.
However, such methods are inefficient. When a journal is written to log-structured storage, the data which has been hardened to the target is not required, but simply takes up space. The cleaning process gains efficiency rapidly when useless data is released quickly.
In the case of temporary files, as soon as the data is no longer necessary, the file is deleted. This results in acceptable cleaning performance when temporary files are used. When journal data sets are interspersed with temporary files, costly data movement must occur to provide the necessary contiguous empty blocks to write new data.
Thus, there is a need in the art for new techniques for managing log-structured storage, and specifically, for managing journal data sets residing in log-structured storage. Such new techniques are provided by the invention described in this specification.